package com.quyunshuo.module.home.room.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import java.util.Date


@Entity(
    tableName = "steps",
    indices = [Index(value = ["date"], unique = true)]
)
data class Steps(

    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    var id: Long = 0,

    /**
     * 步数
     * */
    @ColumnInfo
    var stepCount: Int = 0,

    /**
     * 时长，单位毫秒
     * */
    @ColumnInfo
    var duration: Long = 0L,

    /**
     * 卡路里
     * */
    @ColumnInfo
    var calories: Double = 0.0,

    /**
     * 里程，单位米
     * */
    @ColumnInfo
    var mileage: Double = 0.0,


    /**
     *
     * */
    @ColumnInfo(name = "date")
    var date: Date = Date(), // 使用 Date 类型
)
